package semana4.metodosyarrays.ejercicios;

import java.util.Scanner;

public class Wrapper {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		System.out.println("Introduce una frase: ");
		String frase = scan.nextLine();
		averiguarCodigoChar(frase);
	}

	private static void averiguarCodigoChar(String frase) {
		String cadena = frase;
		for (int i = 0; i < cadena.length(); i++) {
			System.out.println("Caracter: " + cadena.charAt(i) + " Codigo: "
					+ cadena.codePointAt(i) + " Hexadecimal: "
					+ Integer.toString(cadena.charAt(i), 16) + " Octal: "
					+ Integer.toString(cadena.charAt(i), 8) + " Binario: "
					+ Integer.toString(cadena.charAt(i), 2));
		}

	}

}
